.class public Lcom/philzhu/www/framework/impl/AndroidSound;
.super Ljava/lang/Object;
.source "AndroidSound.java"

# interfaces
.implements Lcom/philzhu/www/framework/Sound;


# instance fields
.field soundId:I

.field soundPool:Landroid/media/SoundPool;


# direct methods
.method public constructor <init>(Landroid/media/SoundPool;I)V
    .locals 0
    .parameter "soundPool"
    .parameter "soundId"

    .prologue
    .line 11
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 12
    iput p2, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundId:I

    .line 13
    iput-object p1, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundPool:Landroid/media/SoundPool;

    .line 14
    return-void
.end method


# virtual methods
.method public dispose()V
    .locals 2

    .prologue
    .line 23
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundPool:Landroid/media/SoundPool;

    iget v1, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundId:I

    invoke-virtual {v0, v1}, Landroid/media/SoundPool;->unload(I)Z

    .line 24
    return-void
.end method

.method public play(F)V
    .locals 7
    .parameter "volume"

    .prologue
    const/4 v4, 0x0

    .line 18
    iget-object v0, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundPool:Landroid/media/SoundPool;

    iget v1, p0, Lcom/philzhu/www/framework/impl/AndroidSound;->soundId:I

    const/high16 v6, 0x3f80

    move v2, p1

    move v3, p1

    move v5, v4

    invoke-virtual/range {v0 .. v6}, Landroid/media/SoundPool;->play(IFFIIF)I

    .line 19
    return-void
.end method
